<template>
    <div>
        <div class="tableT">操作日志</div>
        <div class="table">
            <div class="width999">
                <ld-table ref="tableRef"
                              url="/api/governmentEnterpriseInteraction/modifyLog/query/changelog/page"
                              :columns="modifyLogColumns"
                              :where="modifyLogWhere"
                              :heightIsFixed="true"
                              :tableHeight="200"
                              :isPage="false"
                              :isTableTitle="false"
                              :isShowData="true">
                </ld-table>
            </div>
        </div>
        <div class="tableT">审批日志</div>
        <div class="table">
            <div class="width999">
                <ld-table ref="tableRef"
                              url="/api/governmentEnterpriseInteraction/approveLog/query/page"
                              :columns="approvalLogColumns"
                              :where="approvalLogWhere"
                              :isTableTitle="false"
                              :isShowData="true"
                              :heightIsFixed="true"
                              :tableHeight="200"
                              :isPage="false">
                </ld-table>
            </div>
        </div>
    </div>
</template>

<script lang="ts" setup>
    import {
        reactive,
        onMounted,
        watch,
        getCurrentInstance,
        ref,
        defineExpose,
    } from "vue";

    const props = defineProps({
        logId: {
            type: String,
            default: ""
        }
    });
    const state = reactive({});
    const modifyLogColumns = [
        {
            prop: "fieldName",
            label: "字段名称",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "before",
            label: "修改前",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "after",
            label: "修改后",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "opertime",
            label: "操作时间",
            align: "left",
            minWidth: 140,
        },
    ];
    const modifyLogWhere = {modifyInfoId: props.logId, pageNo: 1, pageSize: 999};
    const approvalLogColumns = [
        {
            prop: "realName",
            label: "操作人",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "userUnit",
            label: "操作人单位",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "operateContent",
            label: "操作内容",
            align: "left",
            minWidth: 140,
        },
        {
            prop: "operateTime",
            label: "操作时间",
            align: "left",
            minWidth: 140,
        },
    ];
    const approvalLogWhere = {operateInfoId: props.logId, pageNo: 1, pageSize: 999};
    onMounted(() => {

    });
</script>

<style lang="scss" scoped>
    .table {
        display: flex;
        justify-content: center;
    }

    .tableT {
        display: flex;
        justify-content: center;
        font-size: 16px;
        margin-top: 16px;
    }
</style>
